<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%-- 包含 --%>
<%@ include file="/common/include/page.jsp"%>
<h2 class="contentTitle">管理员修改</h2>

<div class="pageContent">
	<form method="post" action="${rootPath}/back/admins/adminsUpdateSubmit.htm" 
			class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
		<%--
			validateCallback(this, navTabAjaxDone):对提交的返回json,不同处理的选项卡不同
		--%>
		
		<!-- 传值 -->
		<%-- 当前选项卡关闭,哪个选项卡打开 --%>
		<input type="hidden" name="navTabId" value="admislist">	
		<input type="hidden" name="rel" value="admislist">	
		<input type="hidden" name="callbackType" value="closeCurrent">	
		<input type="hidden" name="forwardUrl" value="">	
		<input type="hidden" name="confirmMsg" value="">	
		
		<%--
			在更新的时候一定要传上id的值
		 --%>
		<input type="hidden" name="id" value="${requestScope.admins.id }">	
		<div class="pageFormContent nowrap" layoutH="97">
			<dl>
				<dt>角色：</dt>
				<dd>
					<select name="roleId">
						<c:forEach items="${requestScope.roleList}" var="role" varStatus="stat">
							<option value="${role.id}" ${requestScope.admins.roleId == role.id ? 'selected' :''}>${role.name}</option>
						</c:forEach>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>邮箱：</dt>
				<dd>
					<input type="text" name="email" class="required email" alt="请输入您的邮件" value="${requestScope.admins.email }"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>姓名：</dt>
				<dd>
					<input type="text" name="name" class="name"  class="required" maxlength="20" alt="请输入您的姓名" value="${requestScope.admins.name }"/>
					 <span class="info"></span>
				</dd>
			</dl>
			
			
			<dl>
				<dt>性别：</dt>
				<dd>
					<input type="radio" name="sex" id="adminsListsex0" value="0" checked="checked" ${requestScope.admins.sex== '0'? 'checked':'' }/>
					<label for="adminsListsex0">保密 </label>
					<input type="radio" name="sex" id="adminsListsex1" value="1"  ${requestScope.admins.sex== '1'? 'checked':'' } />
					<label for="adminsListsex1">男 </label>
					<input type="radio" name="sex" id="adminsListsex2" value="2"  ${requestScope.admins.sex== '2'? 'checked':'' } />
					<label for="adminsListsex2">女 </label>
				</dd>
			</dl>
			<dl>
				<dt>手机：</dt>
				<dd>
					<input type="text" name="phone" class="phone" alt="请输入您的电话" value="${requestScope.admins.phone }"/>
					 <span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>QQ：</dt>
				<dd>
					<input type="text" name="qq" class="qq" alt="请输入您的QQ" value="${requestScope.admins.qq }"/> 
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>状态：</dt>
				<dd>
					<input type="radio" id="adminsListstatus0" value="0" name="status" ${requestScope.admins.status=='0'?'checked':'' }/>
					<label for="adminsListstatus0">禁用</label>
					<input type="radio" id="adminsListstatus1" value="1" name="status" ${requestScope.admins.status=='1'?'checked':'' }/>
					<label for="adminsListstatus1">启用</label>
					<span class="info"></span>
				</dd>
			</dl>
			<div class="divider"></div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div>
				</li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>

</div>


<script type="text/javascript">
	function customvalidXxx(element) {
		if ($(element).val() == "xxx")
			return false;
		return true;
	}
</script>
